package cn.wolfcode.trip.base.domain;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class User extends BaseDomain{
    private static final int GENDER_SECRET = -1;    // 保密
    private static final int GENDER_MAN = 0;        // 男
    private static final int GENDER_WOMAN = 1;      // 女
    // 邮箱
    private String email;
    // 昵称
    private String nickName;
    // 密码
    private String password;
    // 常住地
    private String place;
    // 头像
    private String headImgUrl;
    // 性别
    private Integer gender = GENDER_SECRET;
    // 封面
    private String coverImgUrl;
    // 签名
    private String sign;

    // 性别对应的名称
    public String getGenderName() {
        String genderName;
        if (gender == GENDER_WOMAN) {
            genderName = "女";
        } else if (gender == GENDER_MAN) {
            genderName = "男";
        } else {
            genderName = "保密";
        }
        return genderName;
    }
}